home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global DBfact, TBfact, gAlpha
- if the machineType = 256 then
- if the platform = "Windows,32" then
- openXLib(the pathName & "XTRAS32\V12Dbe")
- openXLib(the pathName & "XTRAS32\V12Table")
- openXLib(the pathName & "XTRAS32\Fileio")
- openXLib(the pathName & "XTRAS32\FileXtra")
- else
- openXLib(the pathName & "XTRAS16\V12Dbe")
- openXLib(the pathName & "XTRAS16\V12Table")
- openXLib(the pathName & "XTRAS16\Fileio")
- openXLib(the pathName & "XTRAS16\FileXtra")
- end if
- else
- openXLib(the pathName & "xtras:V12Dbe")
- openXLib(the pathName & "xtras:V12Table")
- end if
- loadBrowser()
- getPrefThingy()
- loadBrowser()
- set DBfact to xtra("V12Dbe")
- set TBfact to xtra("V12Table")
- set the visible of sprite 11 to 0
- set the visible of sprite 12 to 0
- set the visible of sprite 13 to 0
- set the visible of sprite 14 to 0
- set the visible of sprite 15 to 0
- set the visible of sprite 16 to 0
- set the visible of sprite 18 to 0
- set the visible of sprite 19 to 0
- set the visible of sprite 20 to 0
- set the visible of sprite 21 to 0
- set the visible of sprite 22 to 0
- put "All Shareware" into field "fld"
- set gAlpha to 1
- put char gAlpha of field "alphaBet" into field "alphakey"
- set the keyDownScript to "checkKeys"
- end
-
- on checkKeys
- if (the key = RETURN) or (the key = ENTER) then
- set i to the key
- put i
- searchTitle()
- dontPassEvent()
- else
- pass()
- end if
- end
-
- on searchTitle
- global gTB
- cursor(4)
- puppetSound(1, "pioolb")
- mSetCriteria(gTB, "appname", "Contains", field "searchFld")
- mSelect(gTB)
- set n to mSelectCount(gTB)
- if n <> 0 then
- put n into field "NumberFound"
- put mGetField(gTB, "category") into field "category"
- put mGetField(gTB, "appname") into field "appname"
- put mGetField(gTB, "highs") into field "highs"
- put mGetField(gTB, "lows") into field "lows"
- put mGetField(gTB, "BottomLine") into field "BottomLine"
- put mGetField(gTB, "Rating") into field "Rating"
- put mGetField(gTB, "m/y/pg") into field "m/y/pg"
- put mGetField(gTB, "AlphSortKey") into field "AlphSortKey"
- else
- byebye()
- end if
- showSelection()
- go("db2")
- cursor(-1)
- end
-
- on complexSearch
- global gTB
- cursor(4)
- puppetSound(1, "pioolb")
- mSetCriteria(gTB, "appname", "contains", field "searchFld")
- mSetCriteria(gTB, "and", "CoName", "contains", field "searchCo")
- mSetCriteria(gTB, "and", "Rating", "contains", field "searchRating")
- mSelect(gTB)
- set n to mSelectCount(gTB)
- if n <> 0 then
- put n into field "NumberFound"
- put mGetField(gTB, "appname") into field "appname"
- put mGetField(gTB, "highs") into field "highs"
- put mGetField(gTB, "lows") into field "lows"
- put mGetField(gTB, "BottomLine") into field "BottomLine"
- put mGetField(gTB, "Rating") into field "Rating"
- put mGetField(gTB, "AlphSortKey") into field "AlphSortKey"
- else
- byebye()
- end if
- showSelection()
- go("db2")
- cursor(-1)
- end
-
- on byebye
- alert("No matching items were found.")
- closeP()
- openDB()
- showSelection()
- go("db2")
- end
-
- on stopMovie
- global gTB, gDb
- set gTB to 0
- set gDb to 0
- end
-
- on showInstall
- set spriteNum to castspritea("Install")
- puppetSound(2, 0)
- puppetSound(2, "blooip")
- puppetSprite(spriteNum, 1)
- repeat with index = -8 to 8
- set pos to index * 40
- set the locH of sprite spriteNum to pos
- updateStage()
- end repeat
- end
-
- on hideInstall
- set spriteNum to castspritea("Install")
- if the locH of sprite spriteNum <> 320 then
- exit
- end if
- puppetSound(2, 0)
- puppetSound(2, "pioolb")
- puppetSprite(spriteNum, 1)
- repeat with index = 8 down to -8
- set pos to index * 40
- set the locH of sprite spriteNum to pos
- updateStage()
- end repeat
- end
-
- on doPopMenu spriteNum, h, v
- set the visible of sprite spriteNum to 1
- set the locH of sprite spriteNum to h
- set the locV of sprite spriteNum to v
- updateStage()
- set cNum to the castNum of sprite spriteNum
- set lastSelection to 0
- set len to the number of lines in field cNum
- repeat while the stillDown
- set mc to the mouseLine
- if (0 < mc) and (mc <= len) and rollOver(spriteNum) then
- if mc <> lastSelection then
- set lastSelection to mc
- hilite line mc of field cNum
- updateStage()
- end if
- next repeat
- end if
- if mc <> lastSelection then
- set lastSelection to -1
- hilite line len + 1 of field cNum
- updateStage()
- end if
- end repeat
- set the visible of sprite spriteNum to 0
- set the visible of sprite 47 to 0
- updateStage()
- if line lastSelection of field cNum <> EMPTY then
- return lastSelection
- else
- return -1
- end if
- end
-
- on TrackClick
- set spriteNum to the clickOn
- set offCast to the castNum of sprite spriteNum
- set onCast to offCast + 1
- set the castNum of sprite spriteNum to onCast
- updateStage()
- repeat while the mouseDown
- if rollOver(spriteNum) then
- set the castNum of sprite spriteNum to onCast
- else
- set the castNum of sprite spriteNum to offCast
- end if
- updateStage()
- end repeat
- set the castNum of sprite spriteNum to offCast
- updateStage()
- return rollOver(spriteNum)
- end
-
- on loadBrowser
- global myFile
- set gOSDir to getOSDirectory()
- put gOSDir & "\" into field "OSPath"
- put gOSDir & "\BROWSER.TXT" into field "ThePath"
- set DaPath to field "ThePath"
- if objectp(myFile) then
- set myFile to 0
- end if
- set myFile to new(xtra("fileio"))
- openFile(myFile, DaPath, 1)
- set TheWeb to readLine(myFile)
- put TheWeb into field "browserSelect"
- closeFile(myFile)
- set myFile to 0
- end
-